<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head >
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="/jquery.js"></script>
<body>
<h1 align="center">核算检测系统</h1>
<form method="post" action="getPage" align="center" >

    <select name="hospitalId">
        <option selected value="0" >--请选择--</option>
        <option th:each="h:${hospName}" th:value="${h.id}" th:text="${h.name}"/>
    </select>

    <input type="submit" th:value="查询">
    <input type="button" onclick="location.href='http://localhost/getHname'" th:value="新增">

    <table align="center" border="1px">
        <tr>
            <td>被检测人</td>
            <td>被检测人手机号</td>
            <td>被检测人身份证</td>
            <td>检测机构</td>
            <td>检测日期</td>
            <td>检测结果</td>
            <td>操作</td>
        </tr>
        <tr th:each="me:${meList}">
            <td th:text="${me.assayUser}"></td>
            <td th:text="${me.phone}"></td>
            <td th:text="${me.cardNum}"></td>
            <td th:text="${me.name}"></td>
            <td th:text="${me.assayTime}"></td>
            <!--th:text="${#dates.format(me.assayTime,'yyyy-MM-dd HH:mm:ss')}"-->

            <td th:if="${me.assayResult}==0">检测中</td>
            <td th:if="${me.assayResult}==1">确诊</td>
            <td>
                <a  th:if="${me.assayResult}==0" th:href="@{/updata(id=${me.id},status=${me.assayResult})}" >确诊</a>
                <a th:if="${me.assayResult}==1" href="#">已确诊</a>
            </td>
        </tr>
    </table>
</form>
</body>
</html>